//
//  URLLoader.h
//  testXMLParse
//
//  Created by Yang Song on 12/6/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>

@protocol URLLoaderDelegate <NSObject>

@required
- (void)receivedData:(NSData *)data withURL:(NSString*)url;
- (void)receiveDataFailedWithError:(NSError *)error withURL:(NSString*)url;
@end

@interface URLLoader : NSObject {
	id delegate;
	NSMutableData   *responseData;
	NSString *urlAddress;
    NSURLConnection *_connection;
}
@property (nonatomic, assign) id delegate;
@property (nonatomic, retain) NSMutableData   *responseData;
@property (nonatomic, retain) NSString *urlAddress;

-(void)loadUrl:(NSString*)httpURL withDelegate:(id)aDelegate;
-(void)cancelLoading;
@end
